home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / Palettes / PAThumbWheel / PAThumbWheel.h < prev    next >
Text File  |  1995-06-12  |  3KB  |  104 lines

  1. #import <appkit/Control.h>
  2. #import "PAThumbWheelCell.h"
  3.  
  4. /******************************************************************************
  5.     PAThumbWheelCell
  6.     
  7. PAThumbWheel offers the functionality of Slider plus the features that you would expect from a real thumbwheel (including 2 3/4 D Graphics!).
  8.  
  9. PAThumbWheel has a linear display mode and a radial display mode and offers the ability to assign a value to the visible region of the control as well as an absolute value that the ThumbWheel will either ignore, bound to or wrap around.
  10.  
  11. PAThumbWheel can also return relative values via its -relativeIntValue & -relativeFloatValue methods. A snap back option allows mouse loops to start from and return to a base value.
  12.  
  13. Copyright 1992, Jeff Martin. (jmartin@next.com 415-780-3833)
  14. ******************************************************************************/
  15.  
  16. @interface PAThumbWheel:Control
  17. {
  18. }
  19.  
  20. + setCellClass:factoryId;
  21. - initFrame:(const NXRect *)f;
  22.  
  23. // Direction: vertical or horizontal
  24. - (int)direction;
  25. - setDirection:(int)dir;
  26. - takeDirectionFromMatrix:sender;
  27. - (BOOL)isVertical;
  28. - setVertical;
  29. - (BOOL)isHorizontal;
  30. - setHorizontal;
  31.  
  32. // DisplayMode: radial or linear
  33. - (int)displayMode;
  34. - setDisplayMode:(int)mode;
  35. - takeDisplayModeFromMatrix:sender;
  36. - toggleDisplayMode:sender;
  37. - (BOOL)isRadial;
  38. - setRadial;
  39. - (BOOL)isLinear;
  40. - setLinear;
  41.  
  42. // Visible min and max
  43. - (float)visibleMax;
  44. - setVisibleMax:(float)max;
  45. - takeVisibleMaxFrom:sender;
  46. - (float)visibleMin;
  47. - setVisibleMin:(float)min;
  48. - takeVisibleMinFrom:sender;
  49. - (float)visibleRange;
  50. - (float)middleValue;
  51.  
  52. // Absolute mode: unbounded, bounded or wrapped
  53. - (int)absoluteMode;
  54. - takeAbsoluteModeFromMatrix:sender;
  55. - setAbsoluteMode:(int)mode;
  56. - (BOOL)isUnbounded;
  57. - setUnbounded;
  58. - (BOOL)isBounded;
  59. - setBounded;
  60. - (BOOL)isWrapped;
  61. - setWrapped;
  62. - (float)absoluteMax;
  63. - setAbsoluteMax:(float)value;
  64. - takeAbsoluteMaxFrom:sender;
  65. - (float)absoluteMin;
  66. - setAbsoluteMin:(float)value;
  67. - takeAbsoluteMinFrom:sender;
  68. - (float)absoluteRange;
  69.  
  70. // Relative Values
  71. - (int)relativeIntValue;
  72. - (float)relativeFloatValue;
  73. - resetRelativeValue;
  74.  
  75. // Snap back characteristic
  76. - (BOOL)snapsBack;
  77. - setSnapsBack:(BOOL)flag;
  78. - takeSnapsBackFromSwitch:sender;
  79. - (float)snapBackValue;
  80. - setSnapBackValue:(float)val;
  81. - takeSnapBackValueFrom:sender;
  82.  
  83. // Dash interval (set in degrees or points depending on displayMode)
  84. - (float)dashInterval;
  85. - setDashInterval:(float)val;
  86. - takeDashIntervalFrom:sender;
  87.  
  88. // Showing the main dash
  89. - (BOOL)showMainDash;
  90. - setShowMainDash:(BOOL)flag;
  91. - takeShowMainDashFromSwitch:sender;
  92.  
  93. // Color of the ThumbWheel
  94. - (NXColor)color;
  95. - setColor:(NXColor)color;
  96. - takeColorFrom:sender;
  97.  
  98. // tag and disabled
  99. - takeTagFrom:sender;
  100. - takeDisabledFromSwitch:sender;
  101.  
  102. @end
  103.  
  104.